﻿class SPConsole:
    "The class responsible for writing to the output window"
    def write(self, text):
        rtTxt.Text += text.ToString()
        
    def writeln(self, text):
        self.write(text.ToString()+"\n")

    def writeDict(self, dict):
        for f in dict:
            self.writeln(f.Key.ToString()+":"+f.Value.ToString())

    def writeDict2(self, dict):
        for f in dict:
            self.writeln(f.ToString())

    def writeColl(self,coll, prop):
        for obj in coll:
            eval("self.writeln(obj."+prop+")")

out = SPConsole()


class SPCoderLog:
	"The class responsible for writing to the Log window"
	def log(self, text):
		rtLog.Text += "[" + DateTime.Now.ToShortTimeString() + "]:" + text.ToString()+"\n";

logger = SPCoderLog()